package demo6;

public class Test {
    public static void main(String[] args) {
        //接口体现的多态
        IF anIf = new Monster();
        anIf = new Car();
        //继承体现的多态
        AAA a = new BBB();
        a=new CCC();
    }
}

interface IF{}
class Monster implements IF{ }
class Car implements IF{}

class AAA{ }
class BBB extends AAA{ }
class CCC extends AAA{ }
